FROM node:9.11.2-alpine 
WORKDIR /app
COPY . /app 
RUN yarn config set registry https://registry.npm.taobao.org -g
RUN yarn 
RUN yarn build


FROM nginx:1.15.1-alpine 
COPY --from=0 /app/dist /usr/share/nginx/html
COPY --from=0 /app/nginx.conf /etc/nginx/nginx.conf

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
